package org.seed.rpc.serverstub;


import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = RpcConfigProperties.RPC_CONFIG_PREFIX)
public class RpcConfigProperties {

    public static final String RPC_CONFIG_PREFIX = "rpc.local";


    /**
     * 服务名称
     *
     * <p>默认取：spring.application.name的值</p>
     */
    private String serviceName;

    /**
     * 本地IP地址
     *
     * <p>用于其他服务找到当前服务节点</p>
     */
    private String ip;

    /**
     * 本地对外RPC服务端口
     */
    private Integer port;

    /**
     * 注册中心地址
     *
     * <p>使用etcd注册中心</p>
     * <p>格式 (使用半角逗号分割多个): 10.100.11.101:31792,10.100.11.100:2379</p>
     */
    private String registry;

    /**
     * 需要扫描的基础包
     */
    private String basePackageScan;


    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getRegistry() {
        return registry;
    }

    public void setRegistry(String registry) {
        this.registry = registry;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getBasePackageScan() {
        return basePackageScan;
    }

    public void setBasePackageScan(String basePackageScan) {
        this.basePackageScan = basePackageScan;
    }
}
